import httpClient from "./http.client.js";
import config from "../config.js";

class UserService {
    login(email, password, factor2) {
        return httpClient.post('oauth2/token', {
            grant_type: 'password',
            client_id: config.ci,
            client_secret: config.cs,
            username: email,
            password: password,
            factor2: factor2
        })
    }

    getUserData() {
        return httpClient.get('user/data')
    }
}

export default new UserService()
